﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using WCFContracts;
using System.ServiceModel;

namespace Presentation
{
    /// <summary>
    /// Author:Sissi-Zeng
    /// Date:2012-08-29 16:30
    /// </summary>
    /// <remarks></remarks>
    public class ProjectBProxy
    {
        ChannelFactory<IProjectBService> channelFactory=null;

        /// <summary>
        /// Gets the project B service.
        /// </summary>
        /// <returns>IProjectBService</returns>
        /// <remarks></remarks>
        public IProjectBService GetProjectBService()
        {
            channelFactory = new ChannelFactory<IProjectBService>("ProjectBClient");
            return channelFactory.CreateChannel();
        }
        /// <summary>
        /// Closes channel factory.
        /// </summary>
        /// <remarks></remarks>
        public void Close()
        {
            if (channelFactory != null) {
                channelFactory.Close();
            }
        }

    }
}